@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }10 ; SOURCE.00120 ; LINE 3030 *= $060040 SRC = $CB50 DES = $CD60 PLA 70 PLA 80 STA SR }C+190 PLA 0100 STA SRC0110 PLA 0120 STA DES+10130 PLA 0140 STA DES0150 PLA 0160 PLA } 0170 TAX ;LENGTH TO MOVE, MAX NO. IS 2550180 LDY #00190 GT1 LDA (SRC),Y0200 STA (DES),Y ;TRANSFER02 }10 INY 0220 DEX 0230 BNE GT1 ;NOT DONE YET0240 RTS GT1 LDA (SRC),Y0200 STA (DES),Y ;TRANSFER02K10 ; SOURCEA.001 LINE 6020 ;MOVES MEMORY FROM SOURCE TO DESTINATION, ANY LENGTH. MOVE LEFT-STARTING FROM LOWEST ADDRESS3}0 *= $060040 SRC = $CB50 DES = $CD60 LEN = $CF70 PLA 80 PLA 90 STA SRC+10100 }PLA 0110 STA SRC0120 PLA 0130 STA DES+10140 PLA 0150 STA DES0160 PLA 0170 STA LEN+10180 } PLA 0190 STA LEN0200 LDY #00210 LDX LEN+1 ;FULL PAGE COUNT0220 BEQ GT1 ;ONLY A PARTIAL PAGE MOVE}0230 GT2 LDA (SRC),Y0240 STA (DES),Y0250 INY 0260 BNE GT20270 INC SRC+1 ;NEXT PAGE0280 INC DES+1}0290 DEX 0300 BNE GT2 ;IF 0 THEN ALL FULL PAGES DONE0310 GT1 LDX LEN ;LENGTH TO MOVE OF PARTIAL PAGE0320 G}T3 LDA (SRC),Y0330 STA (DES),Y ;TRANSFER0340 INY 0350 DEX 0360 BNE GT3 ;NOT DONE YET0370 RTS G{10 ; SOURCE.002 LINE 2020 ;MOVES MEMORY FROM SOURCE TO DESTINATION, 256 MAX LENGTH. MOVE RIGHT-STARTING FROM HIGHEST ADDR }ESS30 *= $060040 SRC = $CB50 DES = $CD60 PLA 70 PLA 80 STA SRC+190 PLA 0100 } STA SRC0110 PLA 0120 STA DES+10130 PLA 0140 STA DES0150 PLA 0160 PLA 0170 TAY ;L }ENGTH TO MOVE, MAX IS 2560180 GT1 DEY 0190 LDA (SRC),Y0200 STA (DES),Y ;TRANSFER0210 CPY #00220 BNE GT1 } ;NOT DONE YET0230 RTS T1 DEY 0190 LDA (SRC),Y0200 STA (DES),Y ;TRANSFER0210 CPY #00220 BNE GT1 10 ; SOURCEA.002 LINE 5020 ;MOVES MEMORY FROM SOURCE TO DESTINATION, ANY LENGTH. MOVE RIGHT-STARTING FROM HIGHEST ADDRESS}30 *= $060040 SRC = $CB50 DES = $CD60 LEN = $CF70 PLA 80 PLA 90 STA SRC+10100 } PLA 0110 STA SRC0120 PLA 0130 STA DES+10140 PLA 0150 STA DES0160 PLA 0170 STA LEN+10180} CLC 0190 ADC SRC+10200 STA SRC+10210 LDA LEN+10220 CLC 0230 ADC DES+1 ;AND TO LAST PAGE OF DE}STINATION0240 STA DES+10250 PLA 0260 TAY ;LO BYTE OF LENGTH0270 BEQ GT1 ;IF ZERO THEN PROCEED} TO FULL PAGE0280 GT2 DEY 0290 LDA (SRC),Y0300 STA (DES),Y ;TRANSFER0310 CPY #00320 BNE GT2 ;NOT DON }E YET0330 GT1 LDX LEN+1 ;COUNTER FOR FULL PAGES0340 BEQ DONE0350 GT3 DEC SRC+10360 DEC DES+10370 GT4 DEY 0380!} LDA (SRC),Y0390 STA (DES),Y0400 CPY #00410 BNE GT4 ;BRANCH IF NOT DONE WITH A PAGE0420 DEX "} ;NEXT PAGE0430 BNE GT30440 DONE RTS CPY #00410 BNE GT4 ;BRANCH IF NOT DONE WITH A PAGE0420 DEX .10 ; SOURCE.00320 ;REVERSES A STRING OF 256 OR LESS CHARACTERS AND SENDS TO ANOTHER STRING.30 ADRS = $CB ;SOURCE STR$}ING40 ADRD = $CD ;DESTINATION STRING50 LYD = $CF60 HYS = $D070 *= $060080 PLA 90 PLA %}0100 STA ADRS+10110 PLA 0120 STA ADRS ;ADDRESS OF SOURCE STRING0130 PLA 0140 STA ADRD+10150 &}PLA 0160 STA ADRD0170 PLA 0180 PLA 0190 STA HYS ;LENGTH OF STRING0200 DEC HYS0210 LDY #002'}20 STY LYD0230 LDY HYS0240 GT1 LDA (ADRS),Y0250 LDY LYD0260 STA (ADRD),Y0270 INY 0280 STY LYD0(}290 DEC HYS0300 LDY HYS0310 CPY #2550320 BNE GT10330 RTS A (ADRD),Y0270 INY 0280 STY LYD0R10 ; SOURCE.004 LINE 3020 ;REVERSES A STRING OF 256 OR LESS CHARACTERS30 LEND = $CB40 HALF = $CD50 HOLD = $CE*}60 LYHOLD = $CF70 HYHOLD = $D080 *= $060090 PLA 0100 PLA 0110 STA LEND+10120 PLA 0130 S+}TA LEND ;ADDRESS OF STRING0140 PLA 0150 PLA 0160 STA HYHOLD ;LENGTH OF STRING 255 OR LESS0170 DEC HYH,}OLD0180 ROR A ;LENGTH OF HALF OF STRING0190 STA HALF0200 LDY #00210 STY LYHOLD0220 LDY HYHOLD-}0230 GT1 LDA (LEND),Y0240 STA HOLD0250 LDY LYHOLD0260 LDA (LEND),Y0270 LDY HYHOLD0280 STA (LEND),Y0.}290 LDA HOLD0300 LDY LYHOLD0310 STA (LEND),Y0320 INY 0330 CPY HALF0340 BEQ DONE0350 STY LYH/}OLD0360 LDY HYHOLD0370 DEY 0380 STY HYHOLD0390 BNE GT10400 DONE RTS 0340 BEQ DONE0350 STY LYHZ10 ; SOURCEA.004 LINE 7020 ;REVERSES A STRING ANY LENGTH30 LEND = $CB40 HEND = $CD50 LSB = $CF60 HOLD = $D1}170 LYHOLD = $D480 HYHOLD = $D590 *= $06000100 PLA 0110 PLA 0120 STA LEND+10130 PLA 0140 2} STA LEND ;ADDRESS OF STRING0150 PLA 0160 STA LSB+10170 PLA 0180 STA LSB ;LENGTH OF STRING0190 3} CLC 0200 ADC LEND0210 STA HEND0220 LDA LEND+10230 ADC LSB+10240 STA HEND+10250 CLC 0260 4}LDA LSB0270 ADC #10280 STA LSB0290 LDA LSB+10300 ADC #00310 STA LSB+10320 CLC 0330 LSR LSB5}+10340 ROR LSB ;LENGTH OF HALF OF STRING0350 LDY #00360 STY LYHOLD0370 STY HYHOLD0380 GT1 LDA (HEND)6},Y0390 STA HOLD0400 LDY LYHOLD0410 LDA (LEND),Y0420 LDY HYHOLD0430 STA (HEND),Y0440 LDA HOLD047}50 LDY LYHOLD0460 STA (LEND),Y0470 INY 0480 BEQ GT30490 GT4 STY LYHOLD0500 CPY LSB0510 BEQ GT28}0520 GT5 LDY HYHOLD0530 DEY 0540 CPY #2550550 BEQ GT60560 GT7 STY HYHOLD0570 CLC 0580 BCC GT10590 9}GT2 LDA LSB+10600 BEQ DONE0610 DEC LSB+10620 CLC 0630 BCC GT50640 GT3 INC LEND+10650 BNE GT40660 G:}T6 DEC HEND+10670 CLC 0680 BCC GT70690 DONE RTS CLC 0630 BCC GT50640 GT3 INC LEND+10650 BNE GT40660 G<10 ; SOURCE.005 LINE 3020 ;CHANGES CAPITAL LETTERS TO LOWER CASE IN A STRING OF 256 MAX. LENGTH.30 ADRS = $CB40 LEN <} = $CD50 *= $060060 PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESS OF SO =}URCE STRING0110 PLA 0120 PLA 0130 STA LEN ;LENGTH OF STRING <2560140 LDY #00150 GT1 LDA (ADRS),Y016 >}0 CMP #910170 BCS GT3 ;ACCUM IS GREATER THAN 1220180 CMP #650190 BCC GT3 ;ACCUM IS LESS THAN 9702 ?}00 CLC ;CAPITAL TO LOWER CASE0210 ADC #320220 STA (ADRS),Y0230 GT3 INY 0240 CPY LEN0250 BNE @}GT10260 RTS ;CAPITAL TO LOWER CASE0210 ADC #320220 STA (ADRS),Y0230 GT3 INY 0240 CPY LEN0250 BNE 10 ; SOURCEA.005 LINE 6020 ;CHANGES CAPITAL LETTERS TO LOWER CASE IN A STRING ANY LENGTH30 ADRS = $CB40 LEN = $C$B}D50 *= $060060 PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESS OF SOURCE ST$C}RING0110 PLA 0120 STA LEN+10130 PLA 0140 STA LEN ;LENGTH OF STRING0150 LDY #00160 GT1 LDA (ADRS$D}),Y0170 CMP #910180 BCS GT3 ;ACCUM IS GREATER THAN 1220190 CMP #650200 BCC GT3 ;ACCUM IS LESS THA$E}N 970210 CLC ;CAPITAL TO LOWER CASE0220 ADC #320230 STA (ADRS),Y0240 GT3 INY 0250 BEQ GT20260 G$F}T4 CPY LEN0270 BNE GT10280 LDA LEN+10290 BEQ DONE0300 DEC LEN+10310 CLC 0320 BCC GT10330 DONE $G}RTS 0340 GT2 INC ADRS+10350 BNE GT4EN+10290 BEQ DONE0300 DEC LEN+10310 CLC 0320 BCC GT10330 DONE $*10 ; SOURCE.006 LINE 3020 ;CHANGES SMALL LETTERS TO CAPITAL LETTERS IN A STRING LESS THAN 256 LONG30 ADRS = $CB40 LEN(I} = $CD50 *= $060060 PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESS OF (J}SOURCE STRING0110 PLA 0120 PLA 0130 STA LEN ;LENGTH OF STRING <2560140 LDY #00150 GT1 LDA (ADRS),Y0(K}160 CMP #1230170 BCS GT3 ;ACCUM IS GREATER THAN 1220180 CMP #970190 BCC GT3 ;ACCUM IS LESS THAN 97(L}0200 SBC #32 ;SMALL LETTER TO CAPITAL0210 STA (ADRS),Y0220 GT3 INY 0230 CPY LEN0240 BNE GT10250 (M} RTS SBC #32 ;SMALL LETTER TO CAPITAL0210 STA (ADRS),Y0220 GT3 INY 0230 CPY LEN0240 BNE GT10250 (10 ; SOURCEA.006 LINE 6020 ;CHANGES LOWER CASE TO UPPER CASE IN ANY STRING LENGTH30 ADRS = $CB40 LEN = $CD50 ,O} *= $060060 PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESS OF SOURCE STRING011,P}0 PLA 0120 STA LEN+10130 PLA 0140 STA LEN ;LENGTH OF STRING1250150 LDY #00160 GT1 LDA (ADRS),Y0,Q}170 CMP #1230180 BCS GT3 ;ACCUM IS GREATER THAN 1220190 CMP #970200 BCC GT3 ;ACCUM IS LESS THAN 97,R}0210 SBC #32 ;SMALL LETTER TO CAPITAL0220 STA (ADRS),Y0230 GT3 INY 0240 BEQ GT20250 GT4 CPY LEN0260 ,S} BNE GT10270 LDA LEN+10280 BEQ DONE0290 DEC LEN+10300 CLC 0310 BCC GT10320 DONE RTS 0330 GT2 INC A,T}DRS+10340 BNE GT4EN+10280 BEQ DONE0290 DEC LEN+10300 CLC 0310 BCC GT10320 DONE RTS 0330 GT2 INC A,10 ; SOURCE.007 LINE 3020 ;REGULAR TO INVERSE CHARACTER 256 MAX. LENGTH30 ADRS = $CB40 *= $060050 PLA 0V}60 PLA 70 STA ADRS+180 PLA 90 STA ADRS ;ADDRESS OF SOURCE STRING0100 PLA 0110 PLA 00W}120 TAX ;LENGTH OF STRING0130 LDY #00140 GT1 LDA (ADRS),Y0150 ORA #1280160 STA (ADRS),Y0170 0X}INY 0180 DEX 0190 BNE GT10200 RTS #00140 GT1 LDA (ADRS),Y0150 ORA #1280160 STA (ADRS),Y0170 0210 ; SOURCEA.007 LINE 6020 ;REGULAR LETTERS TO INVERSE ANY LENGTH30 ADRS = $CB40 LEN = $CD50 *= $060060 4Z} PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESS OF SOURCE STRING0110 PLA 0120 4[} STA LEN+10130 PLA 0140 STA LEN ;LO LENGTH OF STRING0150 LDY #00160 LDX LEN+10170 BEQ GT2 4\} ;NO FULL PAGES0180 GT1 LDA (ADRS),Y0190 ORA #1280200 STA (ADRS),Y0210 INY 0220 BNE GT10230 INC ADR4]}S+10240 DEX 0250 BNE GT10260 GT2 LDX LEN0270 BEQ DONE0280 GT3 LDA (ADRS),Y0290 ORA #1280300 STA (A4^}DRS),Y0310 INY 0320 DEX 0330 BNE GT30340 DONE RTS NE0280 GT3 LDA (ADRS),Y0290 ORA #1280300 STA (A4C05 ; SOURCE.008 LINE 2010 ;INVERSE TO REGULAR CHARACTER 256 MAX LENGTH20 ADRS = $CB30 *= $060040 PLA 58`}0 PLA 60 STA ADRS+170 PLA 80 STA ADRS ;ADDRESS OF SOURCE STRING90 PLA 0100 PLA 0118a}0 TAX 0120 LDY #00130 GT3 LDA (ADRS),Y0140 AND #1270150 STA (ADRS),Y0160 INY 0170 DEX 0180 8b} BNE GT30190 RTS #00130 GT3 LDA (ADRS),Y0140 AND #1270150 STA (ADRS),Y0160 INY 0170 DEX 0180 810 ; SOURCEA.008 LINE 6020 ;REGULAR LETTERS TO INVERSE ANY LENGTH30 ADRS = $CB40 LEN = $CD50 *= $060060 AN INVERSE CHARACTER0170 ORA #128 ;A REGULAR CHARACTER TO INVERSE0180 GT5 STA (ADRS),Y0@m}190 INY 0200 DEX 0210 BNE GT10220 DONE RTS 0230 GT7 AND #1270240 BPL GT5INVERSE0180 GT5 STA (ADRS),Y0@^10 ; SOURCEA.009 LINE 6020 ;REGULAR LETTERS TO INVERSE AND INVERSE TO REGULAR AT SAME TIME, ANY LENGTH.30 ADRS = $CB4Do}0 LEN = $CD50 *= $060060 PLA 70 PLA 80 STA ADRS+190 PLA 0100 STA ADRS ;ADDRESDp}S OF SOURCE STRING0110 PLA 0120 STA LEN+10130 PLA 0140 STA LEN ;LENGTH OF STRING0150 LDY #00160Dq} LDX LEN+10170 BEQ GT20180 GT1 LDA (ADRS),Y0190 CMP #1280200 BCS GT7 ;=> AN INVERSE CHARACTER0210 Dr} ORA #128 ;A REGULAR CHARACTER TO INVERSE0220 GT5 STA (ADRS),Y0230 INY 0240 BNE GT10250 INC ADRS+10260 Ds} DEX 0270 BNE GT10280 GT2 LDX LEN0290 BEQ DONE0300 GT3 LDA (ADRS),Y0310 CMP #1280320 BCS GT40330 Dt} ORA #1280340 GT6 STA (ADRS),Y0350 INY 0360 DEX 0370 BNE GT30380 DONE RTS 0390 GT7 AND #1270400 BPL GDu}T50410 GT4 AND #1270420 BPL GT6 INY 0360 DEX 0370 BNE GT30380 DONE RTS 0390 GT7 AND #1270400 BPL GD&10 ; SOURCE.010 LINE 3020 ;FILL STRING WITH A CHARACTER; 256 MAX LENGTH.30 *= $060040 ADR = $CB ;ADDRESSHw} OF MEMORY50 LEN = $CD60 PLA 70 PLA 80 STA ADR+190 PLA 0100 STA ADR0110 PLA 0120 Hx} PLA 0130 TAX ;LENGTH OF MEMORY TO FILL0140 PLA 0150 PLA ;CHARACTER0160 LDY #00170 GTHy}1 STA (ADR),Y0180 INY 0190 DEX 0200 BNE GT10210 DONE RTS PLA ;CHARACTER0160 LDY #00170 GTHJ10 ; SOURCEA.010 LINE 6020 ;FILL A STRING WITH CHARACTER OF CHOICE, ANY LENGTH30 *= $060040 ADR = $CB ;AL{}DDRESS OF MEMORY50 LEN = $CD60 PLA 70 PLA 80 STA ADR+190 PLA 0100 STA ADR0110 PLA L|}0120 STA LEN+10130 PLA 0140 STA LEN ;LENGTH OF MEMORY TO FILL0150 PLA 0160 PLA ;CHARACTEL}}R0170 LDX LEN+10180 BEQ GT10190 LDY #00200 GT2 STA (ADR),Y0210 INY 0220 BNE GT20230 INC ADR+1L~}0240 DEX 0250 BNE GT20260 GT1 LDY LEN0270 BEQ DONE0280 GT3 DEY 0290 STA (ADR),Y0300 CPY #2550310 L} BNE GT30320 DONE RTS GT20260 GT1 LDY LEN0270 BEQ DONE0280 GT3 DEY 0290 STA (ADR),Y0300 CPY #2550310 L10 ; SOURCE.01120 ;COMPARES TWO STRINGS30 *= $060040 ADR1 = $CB50 ADR2 = $CD60 LENS = $CF ;LENGTH OFP} SHORTER STRING70 RETADR = $D480 PLA 90 PLA 0100 STA ADR1+10110 PLA 0120 STA ADR10130 PLAP} 0140 STA ADR2+10150 PLA 0160 STA ADR20170 PLA 0180 STA LENS+10190 PLA 0200 STA LENS0210 P} LDY #00220 STY RETADR0230 STY RETADR+10240 GT1 LDA (ADR1),Y0250 CMP (ADR2),Y0260 BNE GT2 ;STRINGP}S ARE NOT EQUAL0270 INY 0280 BNE GT30290 INC ADR1+10300 INC ADR2+10310 INC RETADR+10320 GT3 CPY LENP}S0330 BNE GT10340 LDA LENS+10350 BEQ DONE0360 DEC LENS+10370 CLC 0380 BCC GT10390 DONE LDA #0P}0400 STA RETADR+10410 RTS 0420 GT2 INY 0430 BNE GT40440 INC RETADR+10450 GT4 STY RETADR0460 RTS 0P{10 ; SOURCE.01220 ;SEARCHES FOR A SHORT STRING IN A LARGE STRING AND REPORTS VALUE BACK IN RETURN VARIABLE30 *= $060T}0 ;COMPLETELY RELOCATABLE40 AWORDL = $CB ;START ADDRESS OF STRING50 AWORDH = $CC ;ARRAY TO BE SEARCHED60 TOTALT}L = $CD ;LEN OF MAIN STRING70 TOTALH = $CE80 ACODEL = $CF ;START ADDRESS OF CODE$90 ACODEH = $D00100 LCODE = T}$D1 ;LENGTH OF CODE$0110 COUNTL = $D4 ;LOCATION OF CODE$ INSIDE0120 COUNTH = $D5 ;THE STRING ARRAY0130 PLA T}0140 PLA 0150 STA ACODEH0160 PLA 0170 STA ACODEL0180 PLA 0190 PLA 0200 STA LCODE0210 PT}LA 0220 STA AWORDH0230 PLA 0240 STA AWORDL0250 PLA 0260 STA TOTALH0270 PLA 0280 SEC 0290 T} SBC LCODE0300 STA TOTALL0310 BCS GT10320 DEC TOTALH0330 GT1 INC TOTALL0340 BNE GT20350 INC TOTAT}LH0360 GT2 LDA #10370 STA COUNTL0380 LDA #00390 STA COUNTH0400 MAIN LDY #0 ;SET INDEX TO FIRST OF ELEMENT}T0410 LOOP1 LDA (ACODEL),Y ;COMPARE BYTE OF CODE TO0420 CMP (AWORDL),Y ;A BYTE OF THE ELEMENT0430 BNE LOOP2 ;NO T}MATCH? THEN NEXT ELEMENT0440 INY ;MATCH? THEN DO BYTE-BY-BYTE0450 CPY LCODE ;COMPARE TO REST OF ELEMENT0T}460 BNE LOOP10470 RTS ;WE FOUND IT!!0480 LOOP2 CLC ;MOVE POINTER TO NEXT ELEMENT0490 INC AWORDLT}0500 BNE LOOP30510 INC AWORDH0520 LOOP3 LDA COUNTL ;HAVE WE REACHED THE END0530 CMP TOTALL0540 BNE LOOP4 T} ;OF THE STRING ARRAY?0550 LDA COUNTH0560 CMP TOTALH0570 BEQ EXIT ;YES? THEN CODE$ IS NOT HERE0580 LOOP4 T}INC COUNTL0590 BNE LOOP60600 INC COUNTH0610 LOOP6 CLC 0620 BCC MAIN0630 EXIT LDA #00640 STA COUNTL0650T} STA COUNTH0660 RTS 0600 INC COUNTH0610 LOOP6 CLC 0620 BCC MAIN0630 EXIT LDA #00640 STA COUNTL0650T10 ; SOURCE.013 LINE 1020 ;CLEARS A GR.0 SCREEN30 *= $060040 ADR = $CB ;ADDRESS OF SCREEN50 PLA 60X} LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 LDA #0 ;SPACE0110 TAX}Y 0120 LDX #3 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30130 GT2 STA (ADR),Y0140 INY 0150 BNE GT20160 X} INC ADR+10170 DEX 0180 BNE GT20190 LDY #192 ;REST OF 0 SCREEN0200 GT3 DEY 0210 STA (ADR),Y0220 X} CPY #2550230 BNE GT30240 DONE RTS 0190 LDY #192 ;REST OF 0 SCREEN0200 GT3 DEY 0210 STA (ADR),Y0220 X*10 ; SOURCEA.013 LINE 3020 ;CLEARS A GRAPHICS 1 SCREEN30 *= $060040 ADR = $CB ;ADDRESS OF SCREEN50 \} PLA 60 LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 LDA #00110 TAY 0\}120 LDX #1 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30130 GT2 STA (ADR),Y0140 INY 0150 BNE GT20160 IN\}C ADR+10170 DEX 0180 BNE GT20190 LDY #224 ;REST OF 0 SCREEN0200 GT3 DEY 0210 STA (ADR),Y0220 CPY\} #2550230 BNE GT30240 DONE RTS 0190 LDY #224 ;REST OF 0 SCREEN0200 GT3 DEY 0210 STA (ADR),Y0220 CPY\&10 ; SOURCEB.01320 ;CLEARS A GRAPHICS 2 SCREEN30 *= $060040 ADR = $CB ;ADDRESS OF SCREEN50 PLA 60 `} LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 LDA #00110 LDY #240 ;240`} BYTES IN GR.2 SCREEN0120 GT1 DEY 0130 STA (ADR),Y0140 CPY #2550150 BNE GT10160 RTS LDY #240 ;240`j10 ; SOURCE.01420 ;FILLS A GR.0 SCREEN WITH CHARACTER INPUTED30 *= $060040 ADR = $CB ;ADDRESS OF SCREEN50 d} PLA 60 LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 PLA 0110 PLAd} 0120 LDY #00130 LDX #3 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30140 GT2 STA (ADR),Y0150 INY 0160 d}BNE GT20170 INC ADR+10180 DEX 0190 BNE GT20200 LDY #192 ;REST OF 0 SCREEN0210 GT3 DEY 0220 STA (d}ADR),Y0230 CPY #2550240 BNE GT30250 DONE RTS 0200 LDY #192 ;REST OF 0 SCREEN0210 GT3 DEY 0220 STA (d910 ; SOURCE.015 LINE 2020 ;FILLS A GR.1 SCREEN WITH CHARACTER OF CHOICE30 *= $060040 ADR = $CB ;ADDRESS Oh}F SCREEN50 PLA 60 LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 PLA h}0110 PLA ;CHARACTER0120 LDY #00130 LDX #1 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30140 GT2 STA (h}ADR),Y0150 INY 0160 BNE GT20170 INC ADR+10180 DEX 0190 BNE GT20200 LDY #224 ;REST OF 0 SCREEh}N0210 GT3 DEY 0220 STA (ADR),Y0230 CPY #2550240 BNE GT30250 DONE RTS 0200 LDY #224 ;REST OF 0 SCREEhW10 ; SOURCEA.015 LINE 4020 ;FILLS A GR. 2 SCREEN WITH CHARACTER OF CHOICE30 *= $060040 ADR = $CB ;ADDRESSl} OF SCREEN50 PLA 60 LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 PLAl} 0110 PLA 0120 LDY #240 ;240 BYTES IN GR.2 SCREEN0130 GT1 DEY 0140 STA (ADR),Y0150 CPY #2550160 l}BNE GT10170 RTS LDY #240 ;240 BYTES IN GR.2 SCREEN0130 GT1 DEY 0140 STA (ADR),Y0150 CPY #2550160 l10 ; SOURCE.01620 ;FILLS A GR.0 SCREEN WITH TWO CHARACTERS INPUTED30 *= $060040 ADR = $CB ;ADDRESS OF SCREEp}N50 CHAR1 = $CD60 CHAR2 = $CE70 PLA 80 LDA 8990 STA ADR+10100 LDA 880110 STA ADR ;SCp}REEN ADDRESS0120 PLA 0130 PLA 0140 STA CHAR10150 PLA 0160 PLA 0170 STA CHAR20180 LDY #001p}90 LDX #3 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30200 GT2 LDA CHAR10210 STA (ADR),Y0220 INY 0230 Bp}NE GT40240 INC ADR+10250 DEX 0260 BEQ GT70270 GT4 LDA CHAR20280 STA (ADR),Y0290 INY 0300 BNE Gp}T20310 INC ADR+10320 DEX 0330 BNE GT20340 LDY #1920350 BNE GT30360 GT7 LDY #1920370 GT6 LDA CHAR1p}0380 DEY 0390 STA (ADR),Y0400 CPY #2550410 BEQ DONE0420 GT3 LDA CHAR20430 DEY 0440 STA (ADR),Yp}0450 CPY #2550460 BNE GT60470 DONE RTS 550410 BEQ DONE0420 GT3 LDA CHAR20430 DEY 0440 STA (ADR),Yp210 ; SOURCE.01720 ;FILLS A GR.1 SCREEN WITH TWO CHARACTERS INPUTED30 *= $060040 ADR = $CB ;ADDRESS OF SCREEt}N50 CHAR1 = $CD60 CHAR2 = $CE70 PLA 80 LDA 8990 STA ADR+10100 LDA 880110 STA ADR ;SCt}REEN ADDRESS0120 PLA 0130 PLA 0140 STA CHAR10150 PLA 0160 PLA 0170 STA CHAR20180 LDY #001t}90 LDX #1 ;GR.0 SCREEN IS 960 BYTES SO HI BYTE IS 30200 GT2 LDA CHAR10210 STA (ADR),Y0220 INY 0230 Bt}NE GT40240 INC ADR+10250 DEX 0260 BEQ GT70270 GT4 LDA CHAR20280 STA (ADR),Y0290 INY 0300 BNE Gt}T20310 INC ADR+10320 DEX 0330 BNE GT20340 LDY #2240350 BNE GT30360 GT7 LDY #2240370 GT6 LDA CHAR1t}0380 DEY 0390 STA (ADR),Y0400 CPY #2550410 BEQ DONE0420 GT3 LDA CHAR20430 DEY 0440 STA (ADR),Yt}0450 CPY #2550460 BNE GT60470 DONE RTS 550410 BEQ DONE0420 GT3 LDA CHAR20430 DEY 0440 STA (ADR),Yt210 ; SOURCE.01820 ;FILLS A GR.2 SCREEN WITH TWO CHARACTERS INPUTED30 *= $060040 ADR = $CB ;ADDRESS OF SCREEx}N50 CHAR1 = $CE60 PLA 70 LDA 8980 STA ADR+190 LDA 880100 STA ADR ;SCREEN ADDRESS0110x} PLA 0120 PLA 0130 STA CHAR10140 PLA 0150 PLA 0160 TAX 0170 LDY #2400180 GT1 TXA 0190 x} DEY 0200 STA (ADR),Y0210 CPY #2550220 BEQ DONE0230 LDA CHAR10240 DEY 0250 STA (ADR),Y0260 x} CPY #2550270 BNE GT10280 DONE RTS 550220 BEQ DONE0230 LDA CHAR10240 DEY 0250 STA (ADR),Y0260 x*10 ; SOURCE.01920 ; FILLS A 0,1,OR 2 SCREEN FROM LINE TO LINE SPECIFIED WITH CHARACTER CHOSEN30 *= $060040 ADR = |} 8850 START = $CB60 LEN = $CD70 TEMP = $CF80 CLD 90 PLA 0100 PLA 0110 STA TEMP+10120 |} CLC 0130 ADC ADR+10140 STA START+10150 PLA 0160 STA TEMP0170 CLC 0180 ADC ADR0190 STA ST|}ART0200 BCC GT60210 INC START+10220 GT6 PLA ;GET ENDING LINE0230 SEC 0240 SBC TEMP+10250 ST|}A LEN+10260 PLA 0270 STA LEN0280 PLA 0290 PLA 0300 CLC 0310 ADC LEN0320 BCC GT40330 I|}NC LEN+10340 GT4 SEC 0350 SBC TEMP0360 STA LEN0370 BCS GT50380 DEC LEN+10390 GT5 PLA 0400 PLA |} ;CHARACTER0410 LDX LEN+10420 BEQ GT10430 LDY #00440 GT2 STA (START),Y0450 INY 0460 BNE GT20470|} INC START+10480 DEX 0490 BNE GT20500 GT1 LDX LEN0510 BEQ DONE0520 LDY #00530 GT3 STA (START),Y054|}0 INY 0550 DEX 0560 BNE GT30570 DONE RTS LDX LEN0510 BEQ DONE0520 LDY #00530 GT3 STA (START),Y054|910 ; SOURCE.02020 ;FINDS STARTING ADDRESS OF A NUMERIC ARRAY AND RETURNS IT TO BASIC IN THE RETURN VARIABLE30 *= $06}0040 VVTP = 134 ;VARIABLE VALUE TABLE50 VNTD = 132 ;END+1 OF VARIABLE NAME TABLE60 VNTP = 130 ;START }" " "70 VNTPL = $CB ;LENGTH OF VARIABLES IN TABLE80 STARP = 140 ;STRING AND ARRAY TABLE ADDRESS90 COUNT = }$D4 ;FIRST FOR VARIABLE NUMBER, 0-128, IN TABLE THEN USED FOR RETURN ADDRESS OF ARRAY TABLE0100 LEN = $CD ;LENGTH }OF ARRAY NAME0110 TEMP = $CE ;TEMPORARY VALUE HOLDER0120 PLA 0130 PLA 0140 PLA LEN ;LENGTH OF AR}RAY NAME0150 STA LEN0160 TAX 0170 LDA #168 ;INVERSE OPEN PARENTHESE WHICH ENDS A NUMERICAL ARRAY IN THE ARR}AY TABLE0180 STA 1536,X ;WHERE NAME OF ARRAY IS PLACED IN BASIC0190 LDX #00200 STX COUNT0210 STX COUNT+1}0220 SEC 0230 LDA VNTD+10240 SBC VNTP+10250 STA VNTPL+10260 LDA VNTD0270 SEC 0280 SBC VNTP}0290 STA VNTPL ;SET UP LENGTH OF VARIABLES TO SEARCH THROUGH0300 BCS GT00310 DEC VNTPL+10320 GT0 LDY #0033}0 GT1 LDA (VNTP),Y ;MAIN LOOP SEARCHING FOR YOUR VARIABLE NAME0340 CMP #128 ;ALL VARIABLES IN TABLE END IN A REVERSE }CHARACTER0350 BCS GT5 ;>= TO 128? IF YES THEN INCREASE VARIABLE COUNT0360 GT6 CMP 1536,X ;GET ARRAY NAME CHARACTE}R0370 BEQ G0 ;CHECK REST OF NAME IF EQUAL0380 GT8 INY 0390 BNE GT20400 INC VNTP+10410 GT2 CPY VNTPL ;}HAVE WE GONE THROUGH ALL THE VARIABLES IN THE PROGRAM?0420 BNE GT1 ;NO0430 LDA VNTPL+1 ;MAYBE IF HI BYTE OF LEN}GTH IS ZERO0440 BEQ NOFIND ;YES THEN VARIABLE NOT FOUND SO ZERO OUT RETURN VARIABLE AND EXIT0450 DEC VNTPL+1 ;FOR }NEXT TIME0460 CLC 0470 BCC GT10480 GT5 INC COUNT ;SUBROUTINE TO KEEP TRACK OF VARIABLE NUMBER, 0-1270490 BN}E GT60500 ;*** LOOP TO CHECK IF NAME FOUND REALLY IS NAME OF YOUR ARRAY ***0510 G0 LDA VNTP+10520 STA TEMP+10530 } STY TEMP ;SAVE THESE VALUES IN CASE WE MUST CONTINUE SEARCH0540 G2 INX ;NEXT LETTER IN ARRAY NAME0550 INY } ;NEXT LETTER IN VARIABLE NAME IN TABLE0560 BNE G30570 INC VNTP+10580 G3 LDA (VNTP),Y0590 CMP 1536,X}0600 BNE G1 ;NO, THIS IS NOT VARIABLE DESIRED0610 CPX LEN ;ARE WE DONE MATCHING LETTERS IN OUR NAME?0620 } BEQ GOTIT ;YES, THEN WE FOUND OUR NAME IN THE VARIABLE NAME TABLE AND COUNT CONTAINS ITS NUMBER, 0-1270630 BNE G2 } ;KEEP MATCHING NUMBERS0640 G1 LDY TEMP ;NAME DIDN'T MATCH SO RESET VALUES AND KEEP TRYING0650 LDA TEMP+10660 } STA VNTP+10670 LDX #00680 BEQ GT80690 NOFIND LDA #0 ;VARIABLE WE WANT IS NOT FOUND IN VARIABLE TABLE0700 } STA COUNT0710 RTS 0720 GOTIT CLC ;VARIABLE NUMBER 0-1270730 ASL COUNT ;MUST NOW TAKE VARIABLE NUMBER ASSI}GNED TO IT AND MULT BY 8 AND ADD TWO. THIS NUMBER ADDED0740 ;TO VVTP POINTS TO OFFSET FROM STARP WHERE OUR ARRAY BEGINS075}0 BCC G40760 INC COUNT+10770 CLC 0780 G4 ASL COUNT0790 BCC G50800 INC COUNT+10810 CLC 0820 G5} ASL COUNT0830 BCC G60840 INC COUNT+10850 CLC 0860 G6 INC COUNT0870 INC COUNT0880 BCC G80890 } INC COUNT+10900 G8 CLC 0910 LDA VVTP+1 ;ADD IN VVTP0920 ADC COUNT+10930 STA COUNT+10940 LDA VVTP0950} CLC 0960 ADC COUNT0970 STA COUNT0980 BCC G90990 INC COUNT+11000 CLC 1010 G9 LDY #11020 L}DA (COUNT),Y ;GET HIGH BYTE OF OFFSET AND ADD TO STARP1030 ADC STARP+11040 STA TEMP+1 ;TEMPORARY HOLD SINCE MUST U}SE ADDRESS OF COUNT IN LINE 10501050 DEY 1060 LDA (COUNT),Y ;GET LO BYTE OF OFFSET1070 ADC STARP1080 STA }COUNT ;RETURN ADDRESS OF VARIABLE FOR BASIC1090 BCC G71100 INC TEMP+11110 G7 LDA TEMP+11120 STA COUNT+111}30 RTS URN ADDRESS OF VARIABLE FOR BASIC1090 BCC G71100 INC TEMP+11110 G7 LDA TEMP+11120 STA COUNT+111 10 ; SOURCE.02120 ;INTERNAL BCD NUMBER TRANSFORMED INTO DECIMAL FORM. NUMBER MUST BE LESS THAN 65536.30 *= $060040} FLPTR = $FC ;POINTER TO FLOATING POINT NUMBER50 FLDOP = $DD8D ;LOAD F.P. TO FRO ROUTINE60 FPI = $D9D2 ;CON}VERT F.P. BCD NUMBER TO INTEGER70 PLA 80 PLA 90 STA FLPTR+10100 PLA 0110 STA FLPTR ;ADDRESS }OF ARRAY NUMBER0120 JSR FLDOP ;PUT NUMBER INTO FRO0130 JSR FPI ;CONVERT NUMBER0140 RTS LPTR ;ADDRESS m10 ; SOURCE.02220 ;FINDS THE HIGHEST NUMBER IN AN ARRAY30 *= $060040 FRO = $D450 FR1 = $E060 FLPTR = $F}C ;ADDRESS OF INTERNAL NUMBER USED IN JSR STATEMENTS70 HIGH = $CB80 LEN = $CD90 PLA 0100 PLA 0110 } STA FLPTR+10120 PLA 0130 STA FLPTR ;ADDRESS OF ARRAY0140 PLA 0150 STA LEN+10160 PLA 0170 S}TA LEN ;NUMBER OF ELEMENTS IN ARRAY0180 JSR $DD8D ;FIRST INTERNAL # FROM ARRAY TO FRO0190 JSR $D9D2 ;CHANGE} TO 2 BYTE INTERGER0200 GT2 LDA FRO+10210 STA HIGH+10220 LDA FRO0230 STA HIGH ;STORE HIGH NUMBER0240 GT0 }DEC LEN ;COUNTER0250 BNE GT30260 DEC LEN+10270 BMI DONE0280 GT3 CLC 0290 LDA FLPTR0300 ADC #60}310 STA FLPTR ;GET NEXT ARRAY NUMBER0320 BCC GT10330 INC FLPTR+10340 GT1 JSR $DD8D0350 JSR $D9D2 ;GET} NEXT NO. & CHANGE TO 2 BYTE INTEGER0360 LDA HIGH+10370 CMP FRO+10380 BEQ TESTLO ;=0390 BCS GT0 ;HIG}H IS > THAN NO. SO CONTINUE0400 BCC GT20410 TESTLO LDA HIGH0420 CMP FRO0430 BCS GT0 ;>= SO NO NEED TO SWI}TCH0440 BCC GT2 ;SWITCH0450 DONE LDA HIGH+10460 STA FRO+10470 LDA HIGH0480 STA FRO0490 RTS SWIz10 ; SOURCE.02320 ;FINDS THE LOWEST NUMBER IN AN ARRAY30 *= $060040 FRO = $D450 FR1 = $E060 FLPTR = $FC} ;ADDRESS OF INTERNAL NUMBER USED IN JSR STATEMENTS70 LOW = $CB80 LEN = $CD90 PLA 0100 PLA 0110 } STA FLPTR+10120 PLA 0130 STA FLPTR ;ADDRESS OF ARRAY0140 PLA 0150 STA LEN+10160 PLA 0170 ST}A LEN ;NUMBER OF ELEMENTS IN ARRAY0180 JSR $DD8D ;FIRST INTERNAL # FROM ARRAY TO FRO0190 JSR $D9D2 ;CHANGE }TO 2 BYTE INTERGER0200 GT2 LDA FRO+10210 STA LOW+10220 LDA FRO0230 STA LOW ;STORE HIGH NUMBER0240 GT0 DE}C LEN ;COUNTER0250 BNE GT30260 DEC LEN+10270 BMI DONE0280 GT3 CLC 0290 LDA FLPTR0300 ADC #6031}0 STA FLPTR ;GET NEXT ARRAY NUMBER0320 BCC GT10330 INC FLPTR+10340 GT1 JSR $DD8D0350 JSR $D9D2 ;GET N}EXT NO. & CHANGE TO 2 BYTE INTEGER0360 LDA LOW+10370 CMP FRO+10380 BEQ TESTLO ;=0390 BCC GT0 ;LOW IS} < THAN NO. SO CONTINUE0400 BCS GT20410 TESTLO LDA LOW0420 CMP FRO0430 BCC GT0 ;<= SO NO NEED TO SWITCH0}435 BEQ GT00440 BCS GT2 ;SWITCH0450 DONE LDA LOW+10460 STA FRO+10470 LDA LOW0480 STA FRO0490 } RTS BEQ GT00440 BCS GT2 ;SWITCH0450 DONE LDA LOW+10460 STA FRO+10470 LDA LOW0480 STA FRO0490 10 ; SOURCE.02420 ;SORT ASCENDING ORDER, INTEGERS UP TO 6553530 *= $060040 FRO = $D450 FLPTR = $FC60 FLPTRB } = $CD ;ADDRESS 6 BYTES BEFORE FLPTR OR ONE INTERNAL NUMBER70 FLPTRH = $E0 ;HOLD ORIGINAL VALUE80 TEMP = $CB } ;A TEMPORARY HOLDING PLACE90 FLAG = $E40100 LEN = $CF ;NUMBER OF ARRAY NUMBERS TO SEARCH STARTING AT (0)0110 L }ENH = $E20120 PLA 0130 PLA 0140 STA FLPTR+10150 STA FLPTRH+10160 PLA 0170 STA FLPTR0180 S }TA FLPTRH0190 PLA 0200 STA LEN+10210 STA LENH+10220 PLA 0230 STA LEN0240 STA LENH0250 G0 JSR }$DD8D ;INTERNAL # TO FRO0260 JSR $D9D2 ;INTERNAL # TO 2 BYTE NUMBER0270 LDA #00280 STA FLAG ;1 IS NOT D}ONE, 0 IS DONE0290 GT0 LDA FRO+10300 STA TEMP+10310 LDA FRO0320 STA TEMP ;TEMPORARY HOLD0330 GT5 DEC LEN}0340 BNE GT30350 DEC LEN+10360 BMI ENDPASS ;HAVE GONE THROUGH ALL NUMBERS, IF FLAG=0 THEN ALL DONE0370 GT3 CLC} 0380 LDA FLPTR ;SET UP TO GET NEXT ARRAY NUMBER0390 ADC #60400 STA FLPTR0410 BCC GT10420 INC FLPT}R+10430 GT1 JSR $DD8D ;INTERNAL # TO FRO0440 JSR $D9D2 ;INTERNAL # TO 2 BYTE #0450 LDA TEMP+10460 CMP FRO}+1 ;COMPARE THE TWO NUMBERS0470 BEQ TESTLO ;MUST CHECK LO BYTE0480 BCC GT0 ;< NO NEED TO SWITCH0490 BCS} SWITCH ;SWITCH NUMBERS0500 G1 BCC G0 ;LONG JUMP0510 TESTLO LDA TEMP ;TEST LO BYTE COMPARISON OF TWO NUMBERS0520 } CMP FRO0530 BEQ GT00540 BCC GT0 ;<=NO NEED TO SWITCH0550 SWITCH LDA FLPTR+1 ;SWITCH NUMBERS0560 STA FLP}TRB+1 ;GET ADDRESS OF INTERNAL NUMBER JUST BEFORE FLPTR0570 LDA FLPTR0580 SEC 0590 SBC #60600 STA FLPTRB}0610 BCS GT60620 DEC FLPTRB+10630 GT6 LDY #5 ;CHANGE 6 BYTES0640 GT7 LDA (FLPTRB),Y0650 STA (FLPTR),Y06}60 DEY 0670 BPL GT70680 JSR $D9AA ;FRO 2 BYTE TO INTERNAL #0690 LDY #5 ;SET UP AND PLACE BACK INTO }MEMORY0700 GT9 LDA FRO,Y0710 STA (FLPTRB),Y0720 DEY 0730 BPL GT90740 LDA #1 ;IF A SWITCH IS MADE AT} ANY TIME SET FLAG TO 10750 STA FLAG0760 BNE GT50770 ENDPASS LDA FLAG ;AFTER GOING THROUGH ALL NUMBERS IF FLAG IS }0 THEN ALL DONE0780 BEQ DONE0790 LDA FLPTRH+1 ;RESTORE ORIGINAL VALUES TO START THROUGH NUMBERS AGAIN0800 STA }FLPTR+10810 LDA FLPTRH0820 STA FLPTR0830 LDA LENH+10840 STA LEN+10850 LDA LENH0860 STA LEN0870} CLC 0880 BCC G10890 DONE RTS FLPTR0830 LDA LENH+10840 STA LEN+10850 LDA LENH0860 STA LEN0870)10 ; SOURCE.02520 ;SORT DESCENDING ORDER, INTEGERS UP TO 6553530 *= $060040 FRO = $D4 ;SEE SOURCE.024 FOR E}XPLAINATIONS50 FLPTR = $FC60 FLPTRB = $CD70 FLPTRH = $E080 TEMP = $CB90 FLAG = $E40100 LEN = $CF0110 LENH }= $E20120 PLA 0130 PLA 0140 STA FLPTR+10150 STA FLPTRH+10160 PLA 0170 STA FLPTR0180 STA F }LPTRH0190 PLA 0200 STA LEN+10210 STA LENH+10220 PLA 0230 STA LEN0240 STA LENH0250 G0 JSR $DD8!}D0260 JSR $D9D20270 LDA #00280 STA FLAG0290 GT0 LDA FRO+10300 STA TEMP+10310 LDA FRO0320 STA T"}EMP0330 GT5 DEC LEN0340 BNE GT30350 DEC LEN+10360 BMI ENDPASS0370 GT3 CLC 0380 LDA FLPTR0390 ADC ##}60400 STA FLPTR0410 BCC GT10420 INC FLPTR+10430 GT1 JSR $DD8D0440 JSR $D9D20450 LDA TEMP+10460 $} CMP FRO+10470 BEQ TESTLO0480 BCS GT0 ;> NO NEED TO SWITCH0490 BCC SWITCH0500 G1 BCC G00510 TESTLO LDA %}TEMP0520 CMP FRO0530 BEQ GT00540 BCS GT0 ;>=NO NEED TO SWITCH0550 SWITCH LDA FLPTR+10560 STA FLPTRB+&}10570 LDA FLPTR0580 SEC 0590 SBC #60600 STA FLPTRB0610 BCS GT60620 DEC FLPTRB+10630 GT6 LDY #5'}0640 GT7 LDA (FLPTR),Y0650 STA (FLPTRB),Y0660 DEY 0670 BPL GT70680 LDA TEMP+10690 STA FRO+10700 (} LDA TEMP0710 STA FRO0720 JSR $D9AA ;FRO 2 BYTE TO INTERNAL0730 LDY #50740 GT9 LDA FRO,Y0750 STA (FLP)}TR),Y0760 DEY 0770 BPL GT90780 LDA #10790 STA FLAG0800 BNE GT50810 ENDPASS LDA FLAG0820 BEQ DO*}NE0830 LDA FLPTRH+10840 STA FLPTR+10850 LDA FLPTRH0860 STA FLPTR0870 LDA LENH+10880 STA LEN+10+}890 LDA LENH0900 STA LEN0910 CLC 0920 BCC G10930 DONE RTS FLPTR0870 LDA LENH+10880 STA LEN+10O10 ; SOURCE.02620 ;SEARCHES A NUMERIC ARRAY FOR A SPECIED NUMBER AND RETURNS THE INDEX VALUE IF FOUND, 65535 IF NOT FOUND.3-}0 *= $060040 FLPTR = $FC50 FRO = $D460 START = $CB70 TOP = $CD80 NUM = $CF90 PLA 0100 .} PLA 0110 STA FLPTR+10120 PLA 0130 STA FLPTR ;ADDRESS OF ARRAY0140 PLA 0150 STA NUM+10160 PLA/} 0170 STA NUM ;NUMBER SEARCHING FOR0180 PLA 0190 STA START+10200 TAY 0210 PLA 0220 STA STAR0}T ;INDEX VALUE TO START THE SEARCH, NORMALLY (0)0230 TAX ;SET UP TO CORRECT ARRAY ADDRESS FOR STARTING POINT01}240 INX 0250 LDA FLPTR0260 GT2 DEX 0270 BNE GT1 ;NOT DONE YET0280 CPY #00290 BEQ GT3 ;HAVE R2}EACHED NEW STARTING ADDRESS0300 CLC 0310 DEY ;HI BYTE NOT YET ZERO0320 GT1 ADC #6 ;NEXT ADDRESS OF AR3}RAY0330 BCC GT2 ;KEEP ADDING0340 INC FLPTR+1 ;FIX HI BYTE0350 CLC 0360 BCC GT20370 GT3 STA FLPTR ;4}NOW HAVE CORRECT STARTING ADDRESS0380 PLA 0390 STA TOP+10400 PLA 0410 STA TOP ;LAST INDEX VALUE TO SE5}ARCH THROUGH0420 INC TOP0430 BNE GT70440 INC TOP+10450 GT7 JSR $DD8D ;INTERNAL NUMBER AT FLPTR TO FRO0460 6} JSR $D9D2 ;CHANGE TO 2 BYTE NUMBER0470 LDA NUM+10480 CMP FRO+1 ;MAKE COMPARISON TO DIESIRED NUMBER0490 7} BEQ TESTLO ;CHECK LO BYTE BEFORE SAYING NUMBERS ARE EQUAL0500 GT8 CLC ;NUMBERS NOT EQUAL SO GET NEXT NUMBER0510 8} LDA FLPTR0520 ADC #60530 STA FLPTR0540 BCC GT5 ;NO NEED TO INCREASE HI BYTE0550 INC FLPTR+10560 9} CLC 0570 GT5 INC START ;INCREASE INDEX0580 BNE GT60590 INC START+10600 GT6 LDA START+1 ;HAVE WE REACHED END :}OF ARRAY TO SEARCH?0610 CMP TOP+10620 BNE GT7 ;NO0630 LDA START ;YES FOR HI BYTE, SO CHECK LO BYTE0640 ;} CMP TOP0650 BNE GT7 ;NO0660 LDA #255 ;YES AND NUMBER NOT FOUND SO SET DUMMY NUMBER IN RETURN VARIABLE AN<}D EXIT0670 STA FRO+10680 STA FRO0690 RTS 0700 TESTLO LDA NUM ;TEST LO BYTE OF NUMBERS BEING COMPARED FOR EQU=}ALITY0710 CMP FRO0720 BNE GT80730 LDA START+10740 STA FRO+10750 LDA START0760 STA FRO0770 >}RTS 0710 CMP FRO0720 BNE GT80730 LDA START+10740 STA FRO+10750 LDA START0760 STA FRO0770 10 ; SOURCE.02720 ;SUMS A NUMERIC ARRAY IF NOT OVER 6553530 *= $060040 FLPTR = $FC ;POINTER TO F.P. NUM50 FL@}D0P = $DD8D ;# TO FR060 FLD1P = $DD9C ;# TO FR170 FADD = $DA66 ;ADD FR0 & FR180 FPI = $D9D2 ;F.P. # TO A}INTEGER90 LEN = $CB0100 PLA 0110 PLA 0120 STA FLPTR+10130 PLA 0140 STA FLPTR ;ADDRESS OF ARRAB}Y0150 PLA 0160 STA LEN+10170 PLA 0180 STA LEN ;# OF ELEMENTS TO SUM0190 SEC 0200 DEC LEN C} ;FIRST ADD TAKES TWO #'S0210 BCS GT30220 DEC LEN+10230 GT3 JSR FLD0P ;FIRST # TO FR00240 GT0 CLC 0250 LDD}A FLPTR0260 ADC #6 ;NEXT F.P. NUMBER0270 STA FLPTR0280 BCC GT10290 INC FLPTR+10300 GT1 JSR FLD1P E};NEXT # TO FR10310 JSR FADD ;ADD NUMBERS IN FR0 AND FR1 AND LEAVE RESULTS IN FR00320 DEC LEN0330 BNE GT003F}40 LDA LEN+10350 BEQ DONE0360 DEC LEN+10370 CLC 0380 BCC GT00390 DONE JSR FPI ;F.P. TO INTEGER04G}00 RTS EN+10350 BEQ DONE0360 DEC LEN+10370 CLC 0380 BCC GT00390 DONE JSR FPI ;F.P. TO INTEGER04 10 ; SOURCE.02820 ;SUMS A NUMERIC ARRAY AND PLACES ANSWER IN ONE LOCATION ABOVE THE TOP OF THE ARRAY30 *= $060040 FI}LPTR = $FC ;POINTER TO F.P. NUM50 FLD0P = $DD8D ;# TO FR060 FLD1P = $DD9C ;# TO FR170 FADD = $DA66 ;ADDJ} FR0 & FR180 FPI = $D9D2 ;F.P. # TO INTEGER90 FSTOP = $DDAB ;FR0 TO DESTINATION OF FLPTR0100 LEN = $CB0110 K} PLA 0120 PLA 0130 STA FLPTR+10140 PLA 0150 STA FLPTR ;ADDRESS OF ARRAY0160 PLA 0170 STA LENL}+10180 PLA 0190 STA LEN ;# OF ELEMENTS TO SUM0200 SEC 0210 DEC LEN ;FIRST ADD TAKES TWO #'S0220 M} BCS GT30230 DEC LEN+10240 GT3 JSR FLD0P ;FIRST # TO FR00250 GT0 CLC 0260 LDA FLPTR0270 ADC #6 ;NEN}XT F.P. NUMBER0280 STA FLPTR0290 BCC GT10300 INC FLPTR+10310 GT1 JSR FLD1P ;NEXT # TO FR10320 JSR FADDO} ;ADD NUMBERS IN FR0 AND FR1 AND LEAVE RESULTS IN FR00330 BCS OUTRANGE0340 DEC LEN0350 BNE GT00360 LDAP} LEN+10370 BEQ DONE0380 DEC LEN+10390 CLC 0400 BCC GT00410 DONE CLC 0420 LDA FLPTR0430 ADC #6Q}0440 STA FLPTR0450 BCC GT20460 INC FLPTR+10470 GT2 JSR FSTOP0480 RTS 0490 OUTRANGE LDA #00500 STA $R}D40510 STA $D5 ;RETURN VARIABLE0520 RTS 10470 GT2 JSR FSTOP0480 RTS 0490 OUTRANGE LDA #00500 STA $710 ; SOURCE.02920 ;PRODUCES AN ANTIC MODE 3 DISPLAY LIST30 DLIST = 56040 DL = $CB50 TEMP = $CD60 *= $06T}0070 PLA 80 LDA 559 ;TURN SCREEN OFF WHILE MAKING A DISPLAY LIST CHANGE90 STA TEMP0100 LDA #00U}110 STA 5590120 LDA DLIST+10130 STA DL+1 ;FOR PAGE ZERO ADDRESSING0140 LDA DLIST0150 STA DL0160 V} LDY #30170 LDA #67 ;ANTIC MODE 3 +640180 STA (DL),Y0190 LDY #60200 LDA #30210 LOOP STA (DL),Y ;EAW}CH LINE FROM ANTIC 2 TO 40220 INY 0230 CPY #24 ;NO. OF LINES WILL BE 200240 BNE LOOP0250 LDA #65 X};MOVE JUMP0260 STA (DL),Y0270 INY 0280 LDA DLIST0290 STA (DL),Y0300 LDA DLIST+10310 INY 0320 Y} STA (DL),Y ;DISPLAY LIST LOCATION0330 LDA TEMP0340 STA 559 ;SCREEN BACK ON0350 RTS 10 INY 0320 k10 ; SOURCE.03020 ;PRODUCES AN ANTIC MODE 4(GRAPHICS MODE 12) DISPLAY LIST30 DLIST = 56040 DL = $CB50 TEMP = $C[}D60 *= $060070 PLA 80 LDA DLIST+190 STA DL+1 ;FOR PAGE ZERO ADDRESSING0100 LDA DLIST011\}0 STA DL0120 LDA 5590130 STA TEMP0140 LDA #00150 STA 559 ;TURN SCREEN OFF WHILE CHANGING DISLPAY ]}LIST0160 LDY #30170 LDA #68 ;ANTIC MODE 4 +640180 STA (DL),Y0190 LDY #60200 LDA #40210 LOOP STA^} (DL),Y ;EACH LINE FROM ANTIC 2 TO 40220 INY 0230 CPY #29 ;DONE0240 BNE LOOP0250 LDA TEMP0260 ST_}A 559 ;SCREEN BACK ON0270 RTS 0 INY 0230 CPY #29 ;DONE0240 BNE LOOP0250 LDA TEMP0260 ST(10 ; SOURCE.03120 ;PRODUCES AN ANTIC MODE 5(GRAPHICS MODE 13) DISPLAY LIST FROM A GR.1+16 SCREEN30 DLIST = 56040 DL =a} $CB50 TEMP = $CD60 *= $060070 PLA 80 LDA DLIST+190 STA DL+1 ;FOR PAGE ZERO ADDRESSINGb}0100 LDA DLIST0110 STA DL0120 LDA 5590130 STA TEMP0140 LDA #00150 STA 559 ;TURN SCREEN OFF Wc}HILE CHANGING DISPLAY LIST0160 LDY #30170 LDA #69 ;ANTIC MODE 5 +640180 STA (DL),Y0190 LDY #60200 d} LDA #50210 LOOP STA (DL),Y ;EACH LINE FROM ANTIC 2 TO 40220 INY 0230 CPY #17 ;DONE WITH LINES0240 BNE Le}OOP0250 LDA #65 ;JUMP COMMAND0260 STA (DL),Y0270 INY 0280 LDA DLIST0290 STA (DL),Y0300 INY f}0310 LDA DLIST+1 ;DISPLAY LIST LOCATION0320 STA (DL),Y0330 LDA TEMP0340 STA 5590350 RTS 00 INY r10 ; SOURCE.03220 ;PRODUCES AN ANTIC MODE C(GRAPHICS MODE 14) DISPLAY LIST FROM A GR.7+16 LIST30 DLIST = 56040 DLNEW = q}?CDUP SYSB SOURCE 001BSOURCEA 001BSOURCE 002B SOURCEA 002B#SOURCE 003B)SOURCE 004B 0SOURCEA 004B;SOURCE 005BASOURCEA 005BHSOURCE 006BNSOURCEA 006BUSOURCE 007BYSOURCEA 007B_SOURCE 008BcSOURCEA 008BiSOURCE 009BnSOURCEA 009BvSOURCE 010BzSOURCEA 010BSOURCE 011BSOURCE 012BSOURCE 013BSOURCEA 013BSOURCEB 013BSOURCE 014BSOURCE 015BSOURCEA 015BSOURCE 016BSOURCE 017BSOURCE 018B SOURCE 019B SOURCE 020BSOURCE 021B SOURCE 022B SOURCE 023BSOURCE 024BSOURCE 025B,SOURCE 026B ?SOURCE 027B HSOURCE 028BSSOURCE 029BZSOURCE 030B`SOURCE 031B gSOURCE 032B{SOURCE 033BSOURCE 034BSOURCE 035BSOURCE 036BSOURCE 037BSOURCE 038B SOURCE 039B SOURCE 040B SOURCE 041BSOURCE 042B SOURCE 043B SOURCE 044B%DOS SYSB*DUP SYSSOURCE 047/SOURCE 048@FSOURCE 049'DOS SYSCDUP SYS $CB50 TEMP = $CD60 *= $060070 PLA 80 LDA 55990 STA TEMP0100 LDA #00110 STA 559 r} ;TURN SCREEN OFF WHILE CHANGING DISPLAY LIST0120 LDA #560130 STA DLNEW0140 LDA #1430150 STA DLNEW+1 ;PLs}ACE TO PUT NEW DISPLAY LIST WHICH IS LONGER THAN GR.7 DISPLAY LIST0160 LDY #00170 LDA #1120180 GT1 STA (DLNEW),Y ;t}START MAKING NEW DISPLAY LIST0190 INY 0200 CPY #30210 BNE GT10220 LDA #760230 STA (DLNEW),Y0240 u} INY 0250 LDA #96 ;SCREEN LOCATION0260 STA (DLNEW),Y0270 INY 0280 LDA #1440290 STA (DLNEW),Y ;NEv}XT ARE DISPLAY LINES0300 INY 0310 LDA #120320 LOOP STA (DLNEW),Y ;EACH LINE FROM ANTIC D TO C0330 INY 0340 w} CPY #197 ;DONE WITH LINES0350 BNE LOOP0360 LDA #65 ;JUMP COMMAND0370 STA (DLNEW),Y0380 INY 039x}0 LDA #560400 STA (DLNEW),Y0410 STA DLIST ;DISPLAY LIST POINTER0420 INY 0430 LDA #143 ;DISPLAY Ly}IST LOCATION0440 STA (DLNEW),Y0450 STA DLIST+10460 LDA TEMP0470 STA 559 ;SCREEN BACK ON0480 RTS z}ST LOCATION0440 STA (DLNEW),Y0450 STA DLIST+10460 LDA TEMP0470 STA 559 ;SCREEN BACK ON0480 RTS 10 ; SOURCE.03320 ;CHANGES DISPLAY LIST FROM A GRAPHICS 8 TO A GRAPHICS 7.5(E) SCREEN. SAME AS DOING A GR. 15 ON A XL OR XE|}.30 DLIST = 560 ;DISPLAY LIST STARTING ADDRESS40 DL = $CD50 PLA 60 LDY #270 LDA DLIST+180 }} STA DL+190 LDA DLIST0100 STA DL0110 LOOP INY 0120 LDA (DL),Y ;GET NUMBER FROM DILPLAY LIST0130 ~}CMP #65 ;ALL DONE IF YES0140 BNE GT10150 RTS 0160 GT1 SEC 0170 SBC #10180 CMP #78 ;IF WAS 79 NEE}D TO CHANGE TO 78. OCCURS IN BEGINNING OF DISPLAY AND AT 4K BOUNDARY JUMP0190 BNE GT20200 STA (DL),Y ;PLACE #78 I}N DISPLAY LIST0210 INY 0220 INY ;SKIP ADDRESS0230 BNE LOOP ;NEXT NUMBER0240 GT2 CMP #14 ;GR. 7}.5 SCREEN0250 BNE LOOP0260 STA (DL),Y ;PLACE #14 IN DISPLAY LIST0270 BEQ LOOPBER0240 GT2 CMP #14 ;GR. 7^10 ; SOURCE.03420 ;FILLS A GR.8 SCREEN WITH TWO CHARACTERS INPUTED30 *= $060040 ADR = $CB ;ADDRESS OF SCREE}N50 CHAR1 = $CD60 CHAR2 = $CE70 PLA 80 LDA 8990 STA ADR+10100 LDA 880110 STA ADR ;SC}REEN ADDRESS0120 PLA 0130 PLA 0140 STA CHAR10150 PLA 0160 PLA 0170 STA CHAR20180 LDY #001}90 LDX #30 ;GR.8 SCREEN IS 30 PAGES LONG0200 GT2 LDA CHAR10210 STA (ADR),Y0220 INY 0230 BNE GT40240 } INC ADR+10250 DEX 0260 BEQ DONE0270 GT4 LDA CHAR20280 STA (ADR),Y0290 INY 0300 BNE GT20310 } INC ADR+10320 DEX 0330 BNE GT20340 DONE RTS A CHAR20280 STA (ADR),Y0290 INY 0300 BNE GT20310 910 ; SOURCE.03520 ;CLEARS A GR.8,E,9,10, & 11 SCREEN.30 *= $060040 ADR = $CB ;ADDRESS OF SCREEN50 PL}A 60 LDA 8970 STA ADR+180 LDA 8890 STA ADR ;SCREEN ADDRESS0100 LDA #0 ;NO DATA ON S}CREEN0110 TAY 0120 LDX #30 ;GR.8 SCREEN IS 30 PAGES LONG0130 GT2 STA (ADR),Y0140 INY 0150 BNE GT201}60 INC ADR+10170 DEX 0180 BNE GT20190 RTS GES LONG0130 GT2 STA (ADR),Y0140 INY 0150 BNE GT201>10 ; SOURCE.03620 ;UNIVERSAL DISK LOADER/SAVER30 *= $060040 ICCOM = $034250 ICBAL = $034460 ICBAH = $03457}0 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 PLA 0110 PLA 0120 PLA ;GET CHANNEL OPENED,} 0,1,2,3 ECT.0130 ASL A0140 ASL A0150 ASL A0160 ASL A ;MULTIPLY BY 16 FOR CORRECT VALUE0170 TA}X 0180 PLA 0190 PLA 0200 STA ICCOM,X ;COMMAND BYTE, 7 FOR READ, 11 FOR WRITE0210 PLA 0220 STA ICBAH,}X ;HI ADDRESS OF DATA FROM OR TO COMPUTER MEMORY0230 PLA 0240 STA ICBAL,X ;LO ADDRESS0250 PLA 0260 STA IC}BLH,X ;HI LENGTH OF DATA TO BE PASSED0270 PLA 0280 STA ICBLL,X ;LO LENGTH0290 JSR CIOV ;TRANSFER DATA0300 } RTS LENGTH OF DATA TO BE PASSED0270 PLA 0280 STA ICBLL,X ;LO LENGTH0290 JSR CIOV ;TRANSFER DATA0300 10 ; SOURCE.03720 ;READ/WRITE ONE SECTOR30 *= $060040 DUNIT = $030150 DCOMND = $030260 DBUFLO = $030470 DBUFŔ}HI = $030580 DAUX2 = $030B90 DAUX1 = $030A0100 DSKINV = $E4530110 PLA 0120 PLA 0130 STA DBUFHI ;HI OFŕ} DESTINATION/SOURCE STRING0140 PLA 0150 STA DBUFLO ;LOW0160 PLA 0170 STA DAUX2 ;HI OF SECTOR #0180 Ŗ} PLA 0190 STA DAUX1 ;LOW0200 PLA 0210 PLA 0220 STA DUNIT ;DRIVE NO.0230 PLA 0240 PLA 0250ŗ} STA DCOMND ;82 TO READ OR 80 TO WRITE A SECTOR0260 JSR DSKINV0270 RTS E NO.0230 PLA 0240 PLA 0250W10 ; SOURCE.03820 ;LOADS NEW CHARACTER SET FROM DISK TO HIGH BYTE OF ADDRESS SPECIFIED.30 ICCOM = $034240 ICBAL = $034ə}450 ICBAH = $034560 ICBLL = $034870 ICBLH = $034980 CIOV = $E45690 *= $06000100 PLA 0110 PLA ɚ}0120 PLA ;LO BYTE OF CHAN0130 ASL A0140 ASL A0150 ASL A0160 TAX 0170 LDA #7 ;GET Bɛ}YTES0180 STA ICCOM,X0190 PLA ;HI BYTE IS ALWAYS ZERO AND WE PLACE IT IN LOW BYTE0200 STA ICBAL,X0210 ɜ} PLA ;LO BYTE IS REALLY HI BYTE OF ICBAH0220 STA ICBAH,X0230 LDA #4 ;SET HI BYTE FOR LENGTH OF BYTEɝ}S TO GET TO 4*256=1024 THIS IS ONE FULL CHARACTER SET0240 STA ICBLH,X0250 LDA #0 ;LO BYTE0260 STA ICBLL,ɞ}X0270 JSR CIOV ;TRANSFER CHARACTER SET0280 RTS STA ICBLH,X0250 LDA #0 ;LO BYTE0260 STA ICBLL,=10 ; SOURCE.03920 ;LOADS/SAVES A MAGNIPRINT PICTURE FROM/TO DISK.30 *= $060040 ICCOM = $034250 ICBAL = $03446͠}0 ICBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 DL = 560 ;DISPLAY LIST0110 *= $0͡}6000120 PLA 0130 PLA 0140 PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0150 ASL A0160 ASL A0170 ͢} ASL A0180 ASL A ;MULTIPLY BY 16 FOR CORRECT VALUE0190 TAX 0200 PLA 0210 PLA 0220 STA ICCOM,X ͣ};COMMAND BYTE, 7 FOR READ, 11 FOR WRITE0230 TAY 0240 LDA #9 ;READ OR WRITE 9 COLOR REGISTERS0250 STA ICBLͤ}L,X0260 LDA #704/2560270 STA ICBAH,X ;HI OF COLOR REGISTERS0280 LDA #704&255 ;LOW0290 STA ICBAL,X0300 ͥ} JSR CIOV0310 LDA #310320 STA ICBLH,X ;7680 +282 BYTES OF DATA TO PASS0330 LDA #260340 STA ICBLL,X0350 ͦ} LDA DL+10360 STA ICBAH,X ;HI LOCATION OF DISPLAY LIST IN 48K COMPUTER0370 LDA DL0380 STA ICBAL,X ;LO0390 ͧ} JSR CIOV0400 RTS CBAH,X ;HI LOCATION OF DISPLAY LIST IN 48K COMPUTER0370 LDA DL0380 STA ICBAL,X ;LO0390 10 ; SOURCE.040 LINE 5020 ;LOADS FROM OR SAVES TO DISK A MICROPAINTER FORMAT PICTURE30 *= $060040 ICCOM = $0342ѩ}50 ICBAL = $034460 ICBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 PLA 0110 PLA 0Ѫ}120 PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0130 ASL A0140 ASL A0150 ASL A0160 ASL A ;MULTѫ}IPLY BY 16 FOR CORRECT VALUE0170 TAX 0180 PLA 0190 PLA 0200 STA ICCOM,X ;COMMAND BYTE, 7 FOR READ, 11 FORѬ} WRITE0210 PLA 0220 STA ICBAH,X ;HI ADDRESS OF DATA FROM OR TO COMPUTER MEMORY0230 PLA 0240 STA ICBAL,X ;ѭ}LO ADDRESS0250 LDA #300260 STA ICBLH,X ;HI LENGTH OF A MICROPAINTER PICTURE0270 LDA #00280 STA ICBLL,X ;LѮ}O LENGTH0290 JSR CIOV ;TRANSFER PICTURE0300 LDA #00310 STA ICBLH,X ;WE ARE GOING TO TRANSFER COLOR REGISTERѯ} DATA FROM OR TO ACCUM. ONE AT A TIME0320 LDA ICCOM,X0330 CMP #70340 BEQ READ0350 LDA 712 ;COLOR REGIѰ}STER0360 JSR CIOV0370 LDA 7080380 JSR CIOV0390 LDA 7090400 JSR CIOV0410 LDA 7100420 JSR CIѱ}OV0430 RTS 0440 READ JSR CIOV0450 STA 7120460 JSR CIOV0470 STA 7080480 JSR CIOV0490 STA 70905Ѳ}00 JSR CIOV0510 STA 7100520 RTS A 7120460 JSR CIOV0470 STA 7080480 JSR CIOV0490 STA 70905/10 ; SOURCE.04120 ;LOADS FROM OR SAVES TO DISK A GRAPHIC MASTER FORMAT PICTURE30 *= $060040 ICCOM = $034250 ICBAմ}L = $034460 ICBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 PLA 0110 PLA 0120 յ}PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0130 ASL A0140 ASL A0150 ASL A0160 ASL A ;MULTIPLY BY ն}16 FOR CORRECT VALUE0170 TAX 0180 PLA 0190 PLA 0200 STA ICCOM,X ;COMMAND BYTE, 7 FOR READ, 11 FOR WRITE0շ}210 PLA 0220 STA ICBAH,X ;HI ADDRESS OF DATA FROM OR TO COMPUTER MEMORY0230 PLA 0240 STA ICBAL,X ;LO ADDREո}SS0250 LDA #300260 STA ICBLH,X ;HI LENGTH OF A GRAPHIC MASTER PICTURE0270 LDA #00280 STA ICBLL,X ;LO LENGչ}TH0290 JSR CIOV ;TRANSFER PICTURE0300 LDA #5 ;NOW TRANSFER COLOR REGISTERS 708 TO 7120310 STA ICBLL,Xպ}0320 LDA #00330 STA ICBLH,X0340 LDA #708/2560350 STA ICBAH,X ;COLOR REGISTER LOCATION HI BYTE0360 LDAջ} #708&2550370 STA ICBAL,X0380 JSR CIOV0390 RTS STA ICBAH,X ;COLOR REGISTER LOCATION HI BYTE0360 LDA?10 ; SOURCE.042 LINE 50 & 6020 ;LOADS A FUN WITH ART PICTURE30 *= $060040 ICCOM = $034250 ICBAL = $034460 Iٽ}CBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 COUNT = $CB0110 PLA 0120 PLA 0130 پ} PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0140 ASL A0150 ASL A0160 ASL A0170 ASL A ;MULTIPLY BYٿ} 16 FOR CORRECT VALUE0180 TAX 0190 LDA #70200 STA ICCOM,X ;COMMAND BYTE0210 LDA #00220 STA ICBLH,X ;}HI LENGTH0230 STA ICBLL,X ;LO LENGTH0240 JSR CIOV ;CHECK FIRST TWO DATA POINTS WHICH INDICATE A FUN WITH ART PIC}TURE0250 CMP #2540260 BNE DONE0270 JSR CIOV0280 CMP #2540290 BNE DONE0300 JSR CIOV ;SET COLO}R REGISTERS0310 STA 7120320 JSR CIOV0330 STA 7080340 JSR CIOV0350 STA 7090360 JSR CIOV0370 } STA 7100380 LDA #00390 STA COUNT0400 LOOP JSR CIOV ;SCRAP NEXT 256 DATA BYTES0410 DEC COUNT0420 BNE L}OOP0430 LDA #150440 STA ICBLH,X ;MOVE 4079 DATA BYTES0450 LDA #2400460 STA ICBLL,X0470 PLA 0480 } STA ICBAH,X0490 PLA 0500 STA ICBAL,X ;SET SCREEN ADDRESS0510 JSR CIOV0520 BMI DONE ;IN CASE OF ERROR}0530 LDA #160540 STA COUNT0550 LDA #00560 STA ICBLH,X0570 STA ICBLL,X0580 LOOP1 JSR CIOV ;FORGET NE}XT 18 DATA BYTES0590 DEC COUNT0600 BNE LOOP10610 LDA #140620 STA ICBLH,X0630 LDA #16 ;REST OF PI}CTURE0640 STA ICBLL,X0650 CLC 0660 LDA ICBAL,X0670 ADC #2400680 STA ICBAL,X0690 LDA ICBAH,X070}0 ADC #150710 STA ICBAH,X ;FIX ADDRESS TO PLACE REST OF PICTURE0720 JSR CIOV0730 DONE RTS LDA ICBAH,X070j10 ; SOURCE.043 LINE 6020 ;LOADS A PICTURE FROM COMPUTEREYES30 *= $060040 ICCOM = $034250 ICBAL = $034460 }ICBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 PLA 0110 PLA 0120 PLA 0130 B}NE GT1 ;1 FOR GR. 8 OR 9 SCREEN0140 LDA #6 ;DEFAULT COLORS FOR ANTIC E SCREEN0150 STA 7080160 LDA #9}0170 STA 7090180 LDA #120190 STA 7100200 LDA #00210 STA 712 ;COLOR REGISTERS0220 GT1 PLA 0230 } PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0240 ASL A0250 ASL A0260 ASL A0270 ASL A ;MULTIPLY }BY 16 FOR CORRECT VALUE0280 TAX 0290 LDA #70300 STA ICCOM,X ;COMMAND BYTE, 7 FOR READ0310 PLA 0320 S}TA ICBAH,X ;HI ADDRESS OF DATA TO COMPUTER MEMORY0330 PLA 0340 STA ICBAL,X ;LO ADDRESS0350 LDA #300360 ST}A ICBLH,X ;HI LENGTH OF A COMPUTEREYES PICTURE0370 LDA #00380 STA ICBLL,X ;LO LENGTH0390 JSR CIOV ;TRANSFER} PICTURE0400 RTS A COMPUTEREYES PICTURE0370 LDA #00380 STA ICBLL,X ;LO LENGTH0390 JSR CIOV ;TRANSFER10 ; SOURCE.044 LINES 50 & 6020 ;LOADS A STRIP POKER PICTURE FROM DISK.30 *= $060040 ICCOM = $034250 ICBAL = } $034460 ICBAH = $034570 ICBLL = $034880 ICBLH = $034990 CIOV = $E4560100 CODE = $CF0110 HOLD = $CD0120 SC}N = $CB0130 PLA 0140 PLA 0150 PLA ;GET CHANNEL OPENED, 0,1,2,3 ECT.0160 ASL A0170 ASL A01}80 ASL A0190 ASL A ;MULTIPLY BY 16 FOR CORRECT VALUE0200 TAX 0210 LDA #70220 STA ICCOM,X ;COMMA}ND BYTE, 7 FOR READ0230 PLA 0240 STA ICBAH,X ;HI ADDRESS OF DATA FROM OR TO COMPUTER MEMORY0250 STA SCN+10260} PLA 0270 STA ICBAL,X ;LO ADDRESS0280 STA SCN0290 LDA #210300 STA ICBLH,X ;HI LENGTH OF DATA TO BE PA}SSED0310 STA HOLD+10320 LDA #2240330 STA ICBLL,X ;LO LENGTH0340 STA HOLD0350 JSR CIOV ;TRANSFER D}ATA0360 LDA #00370 STA ICBLH,X0380 STA ICBLL,X ;NOW FIX COLOR REGISTERS0390 JSR CIOV0400 STA 712041}0 JSR CIOV0420 STA 7080430 JSR CIOV0440 STA 7090450 JSR CIOV0460 STA 7100470 JSR CIOV ;L}AST BYTE IS FOR DECODING0480 STA CODE0490 ;NOW TO DECODE SCREEN0500 LDX HOLD+10510 LDY #00520 LOOP LDA (SCN)},Y0530 EOR CODE0540 STA (SCN),Y ;DO FULL PAGES FIRST0550 INC CODE0560 INY 0570 BNE LOOP0580 INC} SCN+10590 DEX 0600 BNE LOOP0610 LDX HOLD ;REST OF SCREEN0620 LOOP1 LDA (SCN),Y0630 EOR CODE0640 } STA (SCN),Y0650 INC CODE0660 INY 0670 DEX 0680 BNE LOOP10690 RTS SCN),Y0630 EOR CODE0640 \p h  hyhy D L> L JJ    ! LA*` BF}7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L}EE !E^ ^ E E7EȩEdE/EȩE  D} .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU } L ? .  t`GBJ ~DEHI B V0dV}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh}DEL8HI4 0 HI,0 0  9 .G VLO},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO }STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N'}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx }DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC}COPY--FROM, TO?OPTION NOT ALLOWED697 FREE SECTORS COPYING---D8:COPY32.COMl# 0|D .L/%# }##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY }S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E }1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A }LLOWED IN DESTINATION 0 <.|K  :A>810CC ,/> 1C1>  :Z>810CC ,C> 1CCC , 1= 1 :Yh.}hL `=CCЍCCCCCCCCC ; ; ; , 4L3 ,\> 1 * 鈹CɛሢCɛ )CC0/}CC ~* 5CCCC Co> 1 * Cɛ ~* 5ܭCCCC C˭CCLE5CCLE5`C`0}`C`~, , E5C 4L3? , E5CC 4C $;D浭CC 8CCCBC1} lɀYC :L6 : lC񠀈Ѱиi iACCC k:LX6CCCCC q2};L8= ; , ,p  , ,  ,1@  :ɛL 15))C q+L 7= , ,V@  ,u@  :ɛL H 7 3}7Lj7 7Lj7D 8 7L7 7L7բ@ `ߢC ` ,@  * ECɛ>0$C *00C0C *0" CCL4}7`C X*`8` ,@  *0\X TCɛM ~*HC)JJJJ *6CȽC) *(CC0CC5}C`8`=8W=Wy 8W=PyL5 ON ,C` ; *nDEǍHI 1C L!9 :C 6}q+L8L 9 q;L8P 9 q;L8W +L8ML 15))C g+L8 ,C&D?E BHCCC /,C\7}XCC X*C-?0  -?C0L8:8鉍C mC mCE?1?C V0*CCC LW9C? 8}`CL09PC B VB DAEJNK V0 09 ,ʢ? PC D,P B V`CC mC mC?1?L99}CC`i`i`i`i`i`P B:} VBDAEJ VBHIL1HI B} V@`HS S ShH )Lc;Lj;h` 0)¢;})  q; ,` M;hL$; b,hL$; ,>  , ,L,=L1 :HOh:` ; 0L>!}DISK UTILITIES (c)1983 Atari V<}er 2.6f MODIFIED FOR ATARI 800 USEA. DISK DIRECTORY K. BINARY SAVEB. RUN CARTRIDGE L. BINARY LOADC. COPY FILE =}M. RUN AT ADDRESSD. DELETE FILE N. CREATE MEM.SAVE. RENAME FILE O. DUPLICATE FILEF. LOCK FILE P. COPY SECTORSG>}. UNLOCK FILE Q. CHECK SECTORSH. WRITE DOS/DUP R. RADIX CONVERTI. FORMAT DISK S. DRIVE SPEEDJ. DUPLICATE DISK T. WR?}ITE VERIFY:ƛ9!&x#!7&p))'&5./)L''-66C76u8COPY DISK Insert source disk and Λ Insert DESTINATION @}disk and Λ IT'S DONE !'Y' to execute or for menuSource drive # ?DESTINATION drive # ?Source drive is # 1DesA}tination drive is # 1Enter first sectorEnter last sectorCHECK DRIVE # 1 >>>>ERROR # 138<<<Q  HH)}  hyhyB q L> Lm JJ  Ln*` dB%'}8  H H` 1 { LL   !L     Hh SY?  q  1L}  !? S   q 1 L   Ll  Lg E`L   !L)  q 1L}) `L0AM݊L݉ ML  N݆LLLNLMLHG!@}1F GȱGLLEEȩÑEȑEEȑE Ed E7EȩE  q} L !,0,0SGɛ L 1 !L EHEh W G gLLSROTCES EERF } G) *Gȩ GȽG GȌd q q G`  8   0G  `D}CEDC0X:Ȣ Y ȱC* ? 0.. , 0%n ?A[ 0 : L`L  `, 0`Y}`piH n0)բY? 08`0 }  0$L GGȽG L `8L`L}8`  05G)݁,G)ȱGȱGHh0})Hh` B! 8`8iiiLE`}E8FEh( l0`ɃLL L8^~jj8jHi hEEEiEȱEiE` dTE} H8EEȱEEȩEh J E8   . m  i`LI!)E1FR}1LJ舩9GIH`LJJ`HGHh l`} S gL   8 rii `дCDCG W  }C  Lq` X٨`DOS SYS IIIIIIIIIIIIIIIC`0 ߩ0}}`>`}>ե |||DDOS DOSDOS SYS }}}}T}B SOURCE 044BSOURCE 045BSOURCE 046BSOURCE 047B/SOURCE 048B@FSOURCE 049CDOS SYSCDUP } SYS 0`BDELV !B }`LVUQ   ]   TU J ]L!T  #      TU } L ? .  t`GBJ V~DEHI B V0dV}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh}DEL8HI   0 HI,0 0  9 .G VLO},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI} V0 0`B;DELV䌚 !B y`@ʆ v s? F0Ξ05: [ BDEHI} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO }STILL RUN DOS B;DE J V (` 9 V⪍ ઍ  -}LLu DEHILV 9 .l 9 .l  `` s$B VBH}I|DE V BLV nB,DE J V* \*` B V BLVDEHI BLVL}1u H232435; 1 ;  hh@2 e1i1LHҍ 00) 08 109hh@ Ҡ2e}1i1232435ޥ<<8]} CE: vC y@y@`A# *` :105L; 0L>! * 0` * : ;` 1 *` 1 *` Disk Drive Sp}eed:XXX RPM~~~Drive # X PRESS:C > check drive speedL > list error sectorsP > print error sectorsW > write al}l zeroesto error sectorsM > return to main menui0k ^ 1 :ɛL 800 퍍L5 RETRY ERROR 3 TIME(S)؆莟}R'S  `=D;EHI 1 1! @ :ɛ8A0.) ȅ 1 1i}il ! 1L NO SUCH ITEMSELECT ITEM OR FOR MENU!L; .{z:*{}.|~ 1 0 0}JB 18L^%|DLl%DIRECTORY--SEARCH SPEC,LIST FILE? # O 0 n&|D! 1L NOT A DISK FILE}N !B 1L " 1 !BDED:}:1BJ|DE 1DEBH}I 1 h0ߢ 0.  0?詛 1 ~0YЛ 1 "L<" "L } BL1TYPE "Y" TO DELETE...DELETE FILE SPECCOPY--FROM, TO?OPTION NOT ALLOWED035 FREE SECTORS COPYING---D2:DEMO}.SRCUN# 0|D .L$A#B#C#JB|DE 1BHIDD#E 1D#0: B} 1L B#C#C#B# B 1N#$0SYS1}:e#D# d# D# .d#ȽD# d# 𩛙d#X# 1,A#}PdD#ELO- A.BJdD#E 1 1HH 0hh|DL^%1}:e# Lt% e#dD#EL%} 1 0 . .0% 1L WILD CARDS NOT ALLOWED IN DESTINATION 0 A.|K@C=Opގ 6%Yp66͌66`8$R @6 Y0(`(hy6]7C􅂍6@6Lˍ 2͍26 S΍ pލ66HH 0030LSH,